import java.util.ArrayList;
import java.util.Scanner;


public class Day14 {


    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            String first = in.next();
            String second = in.next();
            int left = 0, right = 0;

            ArrayList<Character> l1 = new ArrayList<Character>();
            ArrayList<Character> l2 = new ArrayList<Character>();

            for(int i = 0;i < first.length();i++){
                l1.add(first.charAt(i));
            }
            for(int i = 0;i < second.length();i++){
                l2.add(second.charAt(i));
            }

            for( ; right < l2.size(); right++){

                for( ; left < l1.size(); left ++){
                    if(l2.get(right) == l1.get(left)){
                        l1.remove(left);
                        l2.remove(right);
                        break;
                    }
                }
            }

            if(l2.isEmpty()){
                System.out.println("Yes");
            }else{
                System.out.println("No");
            }
        }
    }
}
